package com.wander.rep.cardui;


import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.fima.cardsui.objects.Card;
import com.wander.rep.R;

public class MyCard extends Card {
	
	/*
	 * Drawable variable in Top-Right hand corner of Card
	 */
	private Drawable indicator;
	
	public MyCard(String title)
	{
		super(title);
	}
	
	public MyCard(String title, String message)
	{
		super(title, message);
	}

	public MyCard(String title, String message, Drawable indicator){
		super(title, message);
		this.indicator = indicator;
	}

	/*
	 * (non-Javadoc)
	 * @see com.fima.cardsui.objects.Card#getCardContent(android.content.Context)
	 */
	@Override
	public View getCardContent(Context context) {
		
		View view = LayoutInflater.from(context).inflate(R.layout.card_ex, null);

		((TextView) view.findViewById(R.id.title)).setText(title);
		((TextView) view.findViewById(R.id.description)).setText(desc);
		
		((ImageView) view.findViewById(R.id.card_indicator)).setImageDrawable(indicator);

		return view;
	}

}